//
//  KLVipDetailCell.m
//  Meboo
//
//  Created by kyo on 2024/1/5.
//

#import "KLVipDetailCell.h"

@interface KLVipDetailCell()

@end

@implementation KLVipDetailCell
- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        [self setupUI];
    }
    return self;
}

#pragma mark - Public Metohd

#pragma mark - Action

#pragma mark - UI
- (void)setupUI {
    self.contentView.backgroundColor = HEXS(@"ffffff");
    
//    self.layer.masksToBounds = YES;
    self.contentView.layer.shadowColor = HEXS(@"333333").CGColor;
    self.contentView.layer.shadowOffset = CGSizeMake(0, 2);//shadowOffset阴影偏移,x向右偏移，y向下偏移，默认(0, -3),这个跟shadowRadius配合使用
    self.contentView.layer.shadowOpacity = 0.2;//阴影透明度，默认0
    self.contentView.layer.shadowRadius = MBHeightScale(5);//阴影半径，默认3
    self.contentView.layer.cornerRadius = MBHeightScale(10);
    
    [self.contentView addSubview:self.iconImageView];
    [self.iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self.contentView);
        make.left.mas_equalTo(MBWidthScale(15));
        make.height.width.mas_equalTo(MBHeightScale(33));
    }];
    
    [self.contentView addSubview:self.titleLab];
    [self.titleLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self.contentView);
        make.left.equalTo(self.iconImageView.mas_right).offset(MBWidthScale(15));
        make.right.mas_equalTo(MBWidthScale(-10));
    }];
}

#pragma mark - Setter && Getter
- (UIImageView *)iconImageView {
    if (!_iconImageView) {
        _iconImageView = [UIImageView new];
        _iconImageView.image = ImageWithName(@"flower_defult");
    }
    return _iconImageView;
}


- (UILabel *)titleLab {
    if (!_titleLab) {
        _titleLab = [UILabel new];
        _titleLab.numberOfLines = 2;
        _titleLab.font = MBHelFontSizeScale(18);
        _titleLab.textColor = HEXS(@"000000");
    }
    return _titleLab;
}
@end
